/*
 * Copyright (c) 2015. For Intelligent Group.
 */

package com.intelligent.ispc.core.dto;


import com.intelligent.ispc.common.dto.AbstractValueObject;
import com.intelligent.ispc.common.mapper.BeanMapper;
import com.intelligent.ispc.common.utils.ApplicationException;
import com.intelligent.ispc.core.entity.Organization;
import com.intelligent.ispc.core.entity.User;
import com.intelligent.ispc.utils.UserStatus;
import org.dozer.Mapping;

import java.util.Date;
import java.util.List;
import java.util.Set;

/**
 * Created by yangli on 2015-07-15.
 */
public class UserDto extends AbstractValueObject {

    private Long id;
    private String loginName;
    private String name;

    private String email;

    private UserStatus status;

    private Boolean isDefault;

    private String phone;
    private String description;
    private String logoPath;
    private Date lastLoginTime;
    private String isSendEmail;


    private OrganizationDto organization;
    private List<RoleDto> roles= null;

    private Set<String> permissions = null;

    public UserDto (){

    }


    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public UserStatus getStatus() {
        return status;
    }

    public void setStatus(UserStatus status) {
        this.status = status;
    }

    public Boolean getIsDefault() {
        return isDefault;
    }

    public void setIsDefault(Boolean isDefault) {
        this.isDefault = isDefault;
    }

    public OrganizationDto getOrganization() {
        return organization;
    }

    public void setOrganization(OrganizationDto organization) {
        this.organization = organization;
    }

    public List<RoleDto> getRoles() {
        return roles;
    }

    public void setRoles(List<RoleDto> roles) {
        this.roles = roles;
    }

    public Set<String> getPermissions() {
        return permissions;
    }

    public void setPermissions(Set<String> permissions) {
        this.permissions = permissions;
    }

    public String getPhone() {
        return phone;
    }

    public UserDto setPhone(String phone) {
        this.phone = phone;
        return this;
    }

    public String getDescription() {
        return description;
    }

    public UserDto setDescription(String description) {
        this.description = description;
        return this;
    }

    public String getLogoPath() {
        return logoPath;
    }

    public UserDto setLogoPath(String logoPath) {
        this.logoPath = logoPath;
        return this;
    }

    public Date getLastLoginTime() {
        return lastLoginTime;
    }

    public UserDto setLastLoginTime(Date lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
        return this;
    }

    public String getIsSendEmail() {
        return isSendEmail;
    }

    public UserDto setIsSendEmail(String isSendEmail) {
        this.isSendEmail = isSendEmail;
        return this;
    }
}
